#!/bin/bash
set -e  # Exit immediately if a command exits with a non-zero status.

DIR=$1
PKG=$2
SRPM=$3

cd $DIR/$PKG
mock -r ../mock.cfg --rebuild $SRPM
cp /var/lib/mock/dist-ocs23-build-repo_8333/result/*.rpm /var/repo/qt/packages
cd /var/repo/qt/
createrepo ./